//
//  NSString+Reform.m
//  UniversalTableView
//
//  Created by 冷悦 on 16/3/28.
//  Copyright © 2016年 冷悦. All rights reserved.
//

#import "NSString+Reform.h"
#import "SyncTimer.h"

@implementation NSString (Reform)

+ (NSString *)sexWithInt:(NSUInteger)sex{
    if (sex == 0) {
        return @"女";
    } else if (sex == 1) {
        return @"男";
    } else {
        return @"";
    }
}

+ (NSString *)carParkinglotWithInt:(NSInteger)parkinglot{
    
    if (parkinglot == 1) {
        return @"需要";
    }else if (parkinglot == 2){
        return @"不需要";
    }else{
        return @"";
    }
}

+ (NSString *)decoratingWithInt:(NSInteger)decorating{
    
    if (decorating == 0) {
        return @"未装修";
    }else if (decorating == 1){
        return @"简装修";
    }else{
        return @"精装修";
    }
}

+ (NSString *)directionWithInt:(NSInteger)direction{
    
    if (direction == 1){
        return @"东";
    }else if (direction == 2){
        return @"南";
    }else if (direction == 3){
        return @"西";
    }else if (direction == 4){
        return @"北";
    }else if (direction == 5){
        return @"东南";
    }else if (direction == 6){
        return @"西北";
    }else if (direction == 7){
        return @"东北";
    }else if (direction == 8){
        return @"西南";
    }else{
        return @"";
    }
}

+ (NSString *)isMarryWithInt:(NSInteger)isMarray{
    if (isMarray == 0) {
        return @"未婚";
    } else if (isMarray == 1){
        return @"已婚";
    } else {
        return @"";
    }
}

+ (NSString *)carStateWithInt:(NSInteger)carState{
    if (carState == 0) {
        return @"未购";
    } else if (carState == 1){
        return @"已购";
    } else {
        return @"";
    }
}

+ (NSString *)pictureAbsolutePathStrWithRelativePathStr:(NSString *)relativePathStr{
    return [NSString stringWithFormat:@"%@%@",kBaseUrl,relativePathStr];
}

+ (NSString *)timeStringWithTimeStamp:(long long)timeStamp{
    if (timeStamp == 0) {
        return @"";
    }else{
        return [SyncTimer timeStampToTimeString:timeStamp];}
}

@end
